package com.JustTest;

import java.util.HashSet;

public class App4 {
    static HashSet<String> test = new HashSet<>();

    public static void main(String[] args) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("a"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("b"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("c"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("d"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("e"+i);
                }
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=0;i<100_100_100;i++){
                    test.add("f"+i);
                }
            }
        }).start();

        try {
            Thread.sleep(30*1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("args = [" + test.size() + "]");
    }
}
